package com.springstudy.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * @author ylm-sigmund
 * @since 2022/8/7 11:46
 * <br>{@link //OnPropertyCondition#getMatchOutcome}
 * <br>{@link //OnPropertyCondition#determineOutcome}
 * <br>{@link //Spec#collectProperties}
 */
@Configuration
@ComponentScan(basePackages = {"com.springstudy.service.impl"})
// matchIfMissing,如果属性缺失,也能匹配(可以创建bean);即该配置可缺省
@ConditionalOnProperty(prefix = "study", name = "enable", havingValue = "true", matchIfMissing = true)
public class HelloStarterServiceAutoConfiguration {

}
